package com.example.controller;

import com.example.service.AopService;
import xyz.lwm.lazycat.annotation.Inject;
import xyz.lwm.lazycat.utility.R;
import xyz.lwm.lazycat.web.annocation.Controller;
import xyz.lwm.lazycat.web.annocation.Delete;
import xyz.lwm.lazycat.web.annocation.Get;

/**
 * aop 示例
 *
 * @author lwm
 */
@Controller("aop")
public class AopController {

    @Inject
    private AopService aopService;

    @Delete("all")
    public R<String> deleteAll() {
        aopService.deleteAllSuccessfully();
        return R.ok("删除成功");
    }

    @Get("all")
    public R<String> resumeAll() {
        aopService.resumeAllSuccessfully();
        return R.ok("恢复成功");
    }

}
